﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Common;
using System.Xml.Linq;
using Wintellect.PowerCollections;

using DbSharp.Framework.DbObject;
using DbSharp.Framework.CaseFile;

namespace DbSharp.Framework.Storage
{
    public interface IRecordsetStorage
    {
        /// <summary>
        /// prepare somethings before saving records
        /// </summary>
        /// <param name="reader"></param>
        void Initialize(DbDataReader reader);


        /// <summary>
        /// save record
        /// </summary>
        /// <param name="reader"></param>
        void SaveRecord(DbDataReader reader);


        /// <summary>
        /// do something after saving records
        /// </summary>
        void Terminate();

       

        /// <summary>
        /// for Xml Storage, this object is List of XElement
        /// for Sqlite storage, the value is a string with format DbFileName:TableName
        /// </summary>
        object RecordsetContainer { get; }


        StorageMediaType StorageMediaType { get; }


        /// <summary>
        /// Return sorted field output name list, order by output name
        /// 
        /// 
        /// </summary>
        /// <returns></returns>
        //TODO: consider to remove this method
        List<string> GetOutputFieldNameList();



        /// <summary>
        /// return the list of output field meta data, order by output name
        /// </summary>
        /// <returns></returns>
        List<FieldMetaData> GetOutputFieldMetaDataQueue();

    }

   
   
}
